/**
 * Created by jijin on 2017/7/22.
 */
import React, { Component } from 'react';
import {
  Navigator
} from 'react-native';

import Layout from './layouts/layout';

export default class AppContainer extends Component {
  render() {
    return (
      <Navigator
        initialRoute={{component: Layout}}
        configureScene={() => Navigator.SceneConfigs.PushFromRight}
        renderScene={(route, navigator) => {
          let Component = route.component;
          return React.createElement(Component, {...route.passProps, navigator})
        }}/>
    )
  }
}

